Solution:

text = 'python is a popular programming language.'
print(f"Number of occurrences: {text.count('p')}")